from poium import Page, Element


class SearchAndCollectPage(Page):
    search_input = Element(css='input[name=k]', describe="主页搜索框")
    search_yes = Element(css='input[name=k]~.search', describe="确认搜索按钮")
    article_title_1 = Element(xpath='//ul/li[1]//a[@class="alink"]', describe="搜索列表第一篇收藏文章标题")
    collect_button_1 = Element(xpath='//ul/li[1]//span[contains(@class, "collect")]', describe="搜索列表第一篇文章收藏按钮")
    collect_list_1 = Element(css='.list_article li:first-child p a', describe="收藏列表第一篇收藏文章标题")
    top_collect = Element(css='li#collect', describe="顶部栏收藏页面入口")
    cancel_collect_1 = Element(css='.list_article li:first-child span.uncollect', describe="列表第一篇收藏文章取消收藏按钮")
    cancel_yes = Element(css='#deleteCollectDialog .opt_p>:last-child', describe="确认取消收藏按钮")